import React, { Component } from 'react';
import './IndexNavList.less';

import { Link } from 'react-router-dom';

export default class IndexNavList extends Component {
    render() {
        return (
            <div className='index-nav-list'>
                {
                    this.props.list.map(item => {
                        return (
                            <Link to={item.url} className='index-nav-item' key={item.id}>
                                <div>{item.title}</div>
                                <div className='image-container'>
                                    <img className='index-nav-icon' src={item.img} alt="" />
                                </div>
                            </Link>
                        )
                    })
                }
            </div>
        );
    }
}